let menu = {};


/**
 * 首页
 * @type {{name: string, path: string, icon: string}}
 */
menu.home = {
    name: '首页',
    path: '/admin',
    icon: 'fa fa-tachometer',
};



/**
 * 权限管理
 * @type {{name: string, icon: string, children: {}}}
 */
menu.permission_manage = {
    name: '权限管理',
    icon: 'fa fa-qrcode',
    children: {}
};
let PermissionManage = menu.permission_manage.children;

PermissionManage.role = {
    name: '角色管理',
    icon: 'fa fa-users',
    path: '/admin/role_manage',
    isPer: true
};

PermissionManage.permissions = {
    name: '权限列表',
    icon: 'fa fa-unlock-alt',
    path: '/admin/permission_manage',
    isPer: true
};


/**
 * 用户管理
 * @type {{name: string, icon: string, children: {}}}
 */
menu.user_manage = {
    name: '用户模块',
    icon: 'fa fa-user-o',
    children: {}
};
let UserManage = menu.user_manage.children;

UserManage.user = {
    name: '用户管理',
    icon: 'fa fa-user',
    path: '/admin/user_manage',
    isPer: true
};

UserManage.personal = {
    name: '个人中心',
    icon: 'fa fa-cog',
    path: '/admin/personal',
    isPer: false
};

/**
 * 系统配置
 * @type {{name: string, path: string, icon: string}}
 */
menu.system_manage = {
    name: '系统配置',
    icon: 'fa fa-cog',
    children: {}
};

let SystemManage = menu.system_manage.children;

SystemManage.config = {
    name: '配置信息',
    icon: 'fa fa-tasks',
    path: '/admin/config_manage',
    isPer: false
};



export default menu;

if (process.env.NODE_ENV == 'development') {

    menu.development_tools = {
        name: '开发工具',
        icon: 'fa fa-wrench',
        children: {}
    };

    let DevelopmentTools = menu.development_tools.children;

    DevelopmentTools.code = {
        name: '构建代码',
        path: '/admin/build_code',
        isPer: true
    };

}
